<?php
namespace App\Repositories\Eloquent;

use App\Models\RemitOrder;
use App\Repositories\Criteria\ToPayCriteria;
use Prettus\Repository\Criteria\RequestCriteria;
use Prettus\Repository\Eloquent\BaseRepository;

class ToPayOrderRepository extends BaseRepository
{

    /**
     * Specify Model class name
     *
     * @return string
     */
    public function model()
    {
        // TODO: Implement model() method.
        return RemitOrder::class;
    }

    public function boot()
    {
        $this->pushCriteria(app(RequestCriteria::class));
        $this->pushCriteria(ToPayCriteria::class);
    }

    public function groupBy($column)
    {
        $this->scopeQuery(function ($query) use ($column) {
            return $query->groupBy($column);
        });
        return $this;
    }




}
